<?php
date_default_timezone_set('Asia/Shanghai');
$url='http://192.168.23.149:8080/?c=LogService&m=conlog';
  $ch = curl_init();  
     curl_setopt($ch, CURLOPT_URL, $url);  
     curl_setopt($ch, CURLOPT_HEADER, false);  
     curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //如果把这行注释掉的话，就会直接输出  
     $result=curl_exec($ch);  
     curl_close($ch);  
     $data='msg:'.$result.'|time:'.date('Y-m-d H:i:s');
file_put_contents('/data/log/file_service/scriptcurl.log',$data.PHP_EOL,FILE_APPEND);
